package com.rerun.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.rerun.entity.DictionariesCategory;
import com.rerun.mapper.DictionariesCategoryMapper;
import com.rerun.service.IDictionariesCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * The type Dictionaries category service.
 *
 * @author dax.
 * @version v1.0
 * @since 2017 /9/30 9:29
 */
@Service
public class DictionariesCategoryServiceImpl extends ServiceImpl<DictionariesCategoryMapper,DictionariesCategory> implements IDictionariesCategoryService {
   @Resource
   private DictionariesCategoryMapper dictionariesCategoryMapper;
    @Override
    public Page<DictionariesCategory> findAllPage(Page<DictionariesCategory> page) {
           page.setRecords(dictionariesCategoryMapper.findAllPage(page));
        return page;
    }

    @Override
    public DictionariesCategory findById(long categoryId) {
        return dictionariesCategoryMapper.findById(categoryId);
    }
}
